<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Chat</title>
		<script type="text/javascript">
			window.onload = function(){
				document.getElementById("form").onsubmit= function(){
					var form  = document.getElementById("form");
					var iderrormsg = document.getElementById("iderrormsg");
					var words = form.words.value;
					if(words==""){
						iderrormsg.innerText="say sth";
						iderrormsg.textContent="say sth";
						return false;
					}
					return true;
				};
			};
		</script>
	</head>
	<body>
		<jsp:include page="/jspdemo/header.jsp" />
		<br>
		<br>
		<textarea rows="10" cols="50" disabled="disabled">${msg }</textarea>
		<form id="form" action="/test/infoOperateServlet?infooperate=chat" method="post">
			<table border="1" cellspacing="0">
				<tr>
					<td><input type="text" name="words" />
					</td>
					<td><input type="submit" value="提交" />
					</td>
				</tr>
			</table>
		</form>
		<label id="iderrormsg" style="color: red"></label>
	</body>
</html>